import datetime

# date: datetime.datetime = datetime.datetime.now()
# date2: datetime.datetime = datetime.datetime.now()
# date3:datetime.timedelta=date-date2
# print(date3.days)

cold_start_user_items_dict = {}
cold_start_user_items_dict.setdefault('user',[])
cold_start_user_items_dict.setdefault('user1',[])
cold_start_user_items_dict['user1'].append(('item',10))
cold_start_user_items_dict['user1'].append(('item',8))
cold_start_user_items_dict['user1'].append(('item',9))
cold_start_user_items_dict = {k: sorted(v, key=lambda x:x[1], reverse=True) \
                                  for k, v in cold_start_user_items_dict.items()}
print(cold_start_user_items_dict)